package routes

import (
	"gitee.com/song-yao-shun/MQH/controller"
	"gitee.com/song-yao-shun/MQH/middleware"
	"github.com/gin-gonic/gin"
)

func PageRoutes(r *gin.Engine){
	pageController := controller.NewPageController()

	page := r.Group("api/pages",middleware.AuthMiddleware())
	{
		page.POST("",pageController.Create)
		page.PUT("/:id",pageController.Update)
		page.GET("/:id",pageController.Show)
		page.DELETE("/:id",pageController.Delete)
		page.POST("/getall",pageController.List)
	}
}